const express = require('express')
const app = express()
const cors = require('cors')
app.use(express.json())
app.use(express.urlencoded({extended:false}))



app.use(cors())

app.post('/add',(req,res)=>{
    res.send({
        status:2000,
        msg:'post express',
        data:[req.body]
    })
})

app.get('/home',(req,res)=>{
    res.send({
        status:200,
        msg:'get express',
        data:[req.query]
    })
})

app.listen(3000, ()=>{
    console.log('3000 running')
})